Carbon


KCFindX509Certificates

Header: Keychain.h Carbon status: Under Evaluation

Finds the certificates in a keychain that match specified search criteria.

OSStatus KCFindX509Certificates (
    KCRef keychain, 
    CFStringRef name, 
    CFStringRef emailAddress, 
    KCCertSearchOptions options, 
    CFMutableArrayRef *certificateItems
);
Parameter descriptions
keychain

A reference to the keychain you want to search. If the keychain is locked, the Unlock Keychain dialog box is automatically displayed.

name

A pointer to a C string containing the certificate owner's common name.

emailAddress

A pointer to a C string containing the certificate owner’s email address.

options

The search criteria you wish to use. See “Certificate Search Option Mask Constants” for a description of this mask.

certificateItems

On return, a pointer to a list of the matching certificates. Pass NULL if you don’t want to obtain these references.

function result

A result code. The result code errKCNoDefaultKeychain indicates that a default keychain was not found. The result code errKCBufferTooSmall indicates that the certificate data was too large for the supplied buffer. In this case, you should allocate a new buffer of sufficient size before calling KCFindX509Certificates again. The result code errKCItemNotFound indicates that no matching certificate was found.

VERSION NOTES

Available beginning with Keychain 2.0.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)